package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author stylefeng123
 * @since 2018-07-19
 */
@TableName("asset_registration")
public class AssetRegistration extends Model<AssetRegistration> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 编码
     */
    private String coding;
    /**
     * 固定资产名称
     */
    private String name;
    /**
     * 规格型号
     */
    private String specification;
    /**
     * 单位
     */
    private String unit;
    /**
     * 数量
     */
    private Integer quantity;
    /**
     * 单价
     */
    @TableField("unit_price")
    private Double unitPrice;
    /**
     * 金额
     */
    private Double amount;
    /**
     * 使用人
     */
    private String user;
    /**
     * 保存地点
     */
    @TableField("save_location")
    private String saveLocation;
    /**
     * 购买时间
     */
    @TableField("purchase_time")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date purchaseTime;
    /**
     * 备注
     */
    private String remarks;
    /**
     * 平台编号
     */
    private String platform;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCoding() {
        return coding;
    }

    public void setCoding(String coding) {
        this.coding = coding;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Double getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public String getSaveLocation() {
        return saveLocation;
    }

    public void setSaveLocation(String saveLocation) {
        this.saveLocation =saveLocation;
    }

    public Date getPurchaseTime() {
        return purchaseTime;
    }

    public void setPurchaseTime(Date purchaseTime) {
        this.purchaseTime = purchaseTime;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getPlatform() {
        return platform;
    }

    public void setPlatform(String platform) {
        this.platform = platform;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "AssetRegistration{" +
        "id=" + id +
        ", coding=" + coding +
        ", name=" + name +
        ", specification=" + specification +
        ", unit=" + unit +
        ", quantity=" + quantity +
        ", unitPrice=" + unitPrice +
        ", amount=" + amount +
        ", user=" + user +
        ", saveLocation=" + saveLocation +
        ", purchaseTime=" + purchaseTime +
        ", remarks=" + remarks +
        ", platform=" + platform +
        "}";
    }
}
